import { request } from '../service'
import IBaseObj from '#/index'

const createSubject = (data: IBaseObj) =>
  request({
    url: '/subject/info/create',
    method: 'POST',
    data,
  })

const querySubject = (data: IBaseObj) =>
  request({
    url: '/subject/info/query',
    method: 'POST',
    data,
  })

const getSubjectById = (subId: number) =>
  request({
    url: `/subject/info/${subId}`,
    method: 'GET',
  })

export default {
  createSubject,
  querySubject,
  getSubjectById,
}
